home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / euphor12 / buzz.ex < prev    next >
Text File  |  1994-04-04  |  2KB  |  89 lines

  1.     -- Buzzword Generator
  2.     -- Add your own phrases!
  3.  
  4. constant leadins = {
  5. "Unfortunately",
  6. "In the final analysis,",
  7. "For all intents and purposes",
  8. "We may definitely conclude that",
  9. "Leading industry analysts agree that",
  10. "Therefore",
  11. "Without a doubt",
  12. "According to the National Enquirer,",
  13. "It is rumoured that"
  14. }
  15.  
  16. constant subjects = {
  17. "Bill Clinton",
  18. "shareware",
  19. "The North American Free Trade Deal",
  20. "C++",
  21. "IBM",
  22. "multimedia PCs",
  23. "local bus video",
  24. "fax modems",
  25. "Euphoria",
  26. "Rapid Deployment Software",
  27. "Bill Gates",
  28. "Microsoft",
  29. "the Pentium processor",
  30. "pen-based computing",
  31. "the promised land of 21st century computing",
  32. "RISC machines",
  33. "object-oriented technology",
  34. "case tools",
  35. "Windows",
  36. "lap top computers",
  37. "notebook computers",
  38. "the Information Super Highway"
  39. }
  40.  
  41. constant verbs = {
  42. "will no longer support",
  43. "can save",
  44. "will nibble away at the installed base of",
  45. "will be the downfall of",
  46. "will lead the way to",
  47. "will be like a cancerous growth in",
  48. "will destroy",
  49. "will make a mockery of",
  50. "will not be compatible with",
  51. "will be a great embarassment to"
  52. }
  53.  
  54. function buzz(integer n)
  55. -- generate a paragraph containing n sentences of pure nonsense
  56.     sequence paragraph
  57.  
  58.     paragraph = ""
  59.     for i = 1 to n do
  60.     paragraph = paragraph &
  61.             leadins [rand(length(leadins))]  & " " &
  62.             subjects[rand(length(subjects))] & " " &
  63.             verbs   [rand(length(verbs))]    & " " &
  64.             subjects[rand(length(subjects))] & ". "
  65.     end for
  66.     return paragraph
  67. end function
  68.  
  69. procedure display(sequence paragraph)
  70. -- neatly display a paragraph
  71.     integer column
  72.  
  73.     column = 1
  74.     for i = 1 to length(paragraph) do
  75.     puts(1, paragraph[i])
  76.     column = column + 1
  77.     if column > 65 and (paragraph[i] = ' ' or paragraph[i] = '-') then
  78.         puts(1, '\n')
  79.         column = 1
  80.     end if
  81.     end for
  82. end procedure
  83.  
  84. puts(1, "\n\t\tComputer Industry Forecast\n")
  85. puts(1, "\t\t--------------------------\n\n")
  86. display(buzz(8))
  87. puts(1, "\n\n")
  88.  
  89.